//
//  LGOtherCitangCollectionViewCell.m
//  ligenyun
//
//  Created by Mac on 2018/4/10.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGOtherCitangCollectionViewCell.h"
@interface  LGOtherCitangCollectionViewCell()
@property(nonatomic, strong) STButton       *iconButton;
@property(nonatomic, strong) STLabel        *titleLable;
@property(nonatomic, strong) STLabel        *desLable;
@end
@implementation LGOtherCitangCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)itemHeight{
    return 230;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    self.layer.cornerRadius = 4;
    self.clipsToBounds = YES;
    CGFloat itemWith = (UIScreenWidth - 30 - 10)/2;
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(15, 10, itemWith-30, 130)
                                                title:nil
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:0
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"宗祠风貌01"]
                                                image:nil];
    [self addSubview:self.iconButton];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.left,self.iconButton.bottom , self.iconButton.width, 30)
                                                     text:@"逝者:邓巧"
                                                textColor:FirstTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    self.titleLable = titleLable;
    [self addSubview:self.titleLable];
    
    STLabel * desLable= [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.left,self.titleLable.bottom, self.iconButton.width, 20)
                                                  text:@"管号:212423"
                                             textColor:SecendTextColor
                                                  font:12
                                           isSizetoFit:NO
                                         textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    [self addSubview:self.desLable];
    
    self.goodButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, 70, 44)
                                                title:@"123"
                                           titleColor:SecendTextColor
                                            titleFont:14
                                         cornerRadius:0
                                      backgroundColor:nil
                                      backgroundImage:nil
                                                image:[UIImage imageNamed:@"浏览_icon"]];
    self.goodButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    self.goodButton.top = desLable.bottom;
    self.goodButton.left = desLable.left;
    self.goodButton.titleEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 0);
    [self addSubview:self.goodButton];
    
    
    self.commentButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, 70, 44)
                                                   title:@"324+"
                                              titleColor:SecendTextColor
                                               titleFont:14
                                            cornerRadius:0
                                         backgroundColor:nil
                                         backgroundImage:nil
                                                   image:[UIImage imageNamed:@"论坛_消息"]];
    self.commentButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    self.commentButton.centerY = self.goodButton.centerY;
    self.commentButton.left = self.goodButton.right  ;
    self.commentButton.titleEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 0);
    [self addSubview:self.commentButton];
}
@end
